package org.lemon.cla.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.ClubApplicationStatusEnum;
import org.lemon.cla.enums.UserRoleEnum; // 导入用户角色枚举 (如果需要显示角色)

import java.time.LocalDateTime;

@Data
@Schema(description = "社团申请视图对象 (包含申请人和审核人信息)")
public class ClubApplicationVo {

    @Schema(description = "申请ID", example = "1")
    private Long applicationId;

    @Schema(description = "申请人用户ID", example = "1")
    private Long userId;

    // --- 申请人用户信息 ---
    @Schema(description = "申请人用户名", example = "applicant_user")
    private String applicantUsername;

    @Schema(description = "申请人头像URL", example = "http://example.com/applicant_avatar.jpg")
    private String applicantAvatarUrl;

    @Schema(description = "申请人真名", example = "王小明")
    private String applicantRealName;

    @Schema(description = "申请人手机号", example = "13712345678")
    private String applicantPhone;

    @Schema(description = "申请人邮箱", example = "applicant@example.com")
    private String applicantEmail;

    @Schema(description = "申请人角色", example = "学生")
    private UserRoleEnum applicantRole;

    @Schema(description = "申请人是否已逻辑删除 (true if applicant is logically deleted)", example = "false")
    private Boolean applicantIsDeleted; // 新增字段：申请人是否已逻辑删除

    @Schema(description = "申请社团ID", example = "1")
    private Long clubId;

    @Schema(description = "申请时间", example = "2024-06-22T10:00:00")
    private LocalDateTime applicationTime;

    @Schema(description = "申请理由", example = "热爱编程，希望加入社团学习交流。")
    private String reason;

    @Schema(description = "申请状态", example = "待审核", allowableValues = {"待审核", "已批准", "已拒绝"})
    private ClubApplicationStatusEnum status;

    @Schema(description = "审核时间", example = "2024-06-23T15:00:00")
    private LocalDateTime reviewTime;

    @Schema(description = "审核人ID", example = "101")
    private Long reviewerId;

    // --- 审核人用户信息 ---
    @Schema(description = "审核人用户名", example = "reviewer_admin")
    private String reviewerUsername;

    @Schema(description = "审核人头像URL", example = "http://example.com/reviewer_avatar.jpg")
    private String reviewerAvatarUrl;

    @Schema(description = "审核人真名", example = "李管理员")
    private String reviewerRealName;

    @Schema(description = "审核人手机号", example = "13987654321")
    private String reviewerPhone;

    @Schema(description = "审核人邮箱", example = "reviewer@example.com")
    private String reviewerEmail;

    @Schema(description = "审核人角色", example = "管理员")
    private UserRoleEnum reviewerRole;

    @Schema(description = "审核人是否已逻辑删除 (true if reviewer is logically deleted)", example = "false")
    private Boolean reviewerIsDeleted; // 新增字段：审核人是否已逻辑删除

}